﻿// Copyright (c) Brock Allen & Dominick Baier. All rights reserved.
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.


using IdentityModel;
using IdentityServer4.Models;
using System.Collections.Generic;
using System.Security.Claims;

namespace IdentityServer
{
    public static class Config
    {
        public static IEnumerable<IdentityResource> GetIdentityResources()
        {
            return new IdentityResource[]
            {
                new IdentityResources.OpenId()
            };
        }

        public static IEnumerable<ApiResource> GetApis()
        {
            return new ApiResource[]
            {
                new ApiResource("copapi","COP Api for AOS products.")
                {
                    
                }
            };
        }

        public static IEnumerable<Client> GetClients()
        {
            return new Client[] {
                 new Client
                 {
                     ClientId="demo-client-id",
                     AllowedGrantTypes= GrantTypes.ClientCredentials,
                     ClientSecrets =
                     {
                         new Secret("secret".Sha256())
                     },
                     Claims= new List<Claim>
                     {
                         new Claim(JwtClaimTypes.PhoneNumber,"helloworld")
                     },
                     AllowedScopes={"copapi"}
                 }
            };
        }
    }
}